package com.lingnan.tijian.mapper;

import com.lingnan.tijian.domain.Checkitem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CheckitemMapper {
    int deleteByPrimaryKey(Integer ciId);

    int insert(Checkitem record);

    int insertSelective(Checkitem record);

    Checkitem selectByPrimaryKey(Integer ciId);

    int updateByPrimaryKeySelective(Checkitem record);

    int updateByPrimaryKey(Checkitem record);

    @Select("select c.ciId ciId,c.ciName ciName,c.ciContent ciContent,c.meaning meaning\n" +
            "from setmealdetailed sd,checkitem c\n" +
            "where sd.ciId=c.ciId  and sd.smId=#{setmealId}")
    List<Checkitem> selectCheckItemList(@Param("setmealId") Integer setmealId);
}